package org.jeecg.modules.geo.core.constant;

import cn.hutool.http.Method;
import lombok.Getter;

@Getter
public enum BimGeoRequestMethod {
    GET(1, Method.GET),
    POST(2, Method.POST),
    PUT(3, Method.PUT),
    DELETE(4, Method.DELETE);

    Integer value;
    Method method;

    BimGeoRequestMethod(Integer value, Method method) {
        this.value = value;
        this.method = method;
    }

    public static Method methodOf(Integer value) {
        if (value == null) {
            return null;
        } else {
            for (BimGeoRequestMethod bimGeoRequestMethod : BimGeoRequestMethod.values()) {
                if (bimGeoRequestMethod.getValue().equals(value)) {
                    return bimGeoRequestMethod.getMethod();
                }
            }
            return null;
        }
    }
}
